/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entidades;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author lomanda
 */
@Embeddable
public class AbonoContratoPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "fkContrato")
    private int fkContrato;
    @Basic(optional = false)
    @NotNull
    @Column(name = "fkAbono")
    private int fkAbono;

    public AbonoContratoPK() {
    }

    public AbonoContratoPK(int fkContrato, int fkAbono) {
        this.fkContrato = fkContrato;
        this.fkAbono = fkAbono;
    }

    public int getFkContrato() {
        return fkContrato;
    }

    public void setFkContrato(int fkContrato) {
        this.fkContrato = fkContrato;
    }

    public int getFkAbono() {
        return fkAbono;
    }

    public void setFkAbono(int fkAbono) {
        this.fkAbono = fkAbono;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) fkContrato;
        hash += (int) fkAbono;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AbonoContratoPK)) {
            return false;
        }
        AbonoContratoPK other = (AbonoContratoPK) object;
        if (this.fkContrato != other.fkContrato) {
            return false;
        }
        if (this.fkAbono != other.fkAbono) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "entidades.AbonoContratoPK[ fkContrato=" + fkContrato + ", fkAbono=" + fkAbono + " ]";
    }
    
}
